﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4_2102A.Shopping.Domain
{
    /*
    //无限递归
    id  |   name    |pid
    1   |   电脑办公|0
    2   |   电脑整机|1
    3   |   电脑配件|1
    4   |   笔记本  |2
    5   |   游戏本  |2
     * **/

    /// <summary>
    /// 分类表
    /// </summary>
    [Table("tb_category")]
    public class CategoryModel
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// //分类上级ID
        /// </summary>
        public Guid ParentId { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string? Sort { get; set; }

        /// <summary>
        /// 分类图标
        /// </summary>
        public string? Icon { get; set; }
    }


}
